package com.comum.javahomework420242025.mapper;

import com.comum.javahomework420242025.pojo.User;
import com.comum.javahomework420242025.pojo.UserForResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface UserMapper {

    List<User> listpart(String areaid, String department, String str);
    @Select("select *, area.department as department " +
            "from user join area on user.areaid=area.id where user.type!='超级管理员'")
    List<UserForResult> findAllUserNameAndDepartment();
    @Select("select area.department as department from user join area " +
            "on user.areaid=area.id where user.id=#{userid}")
    String joinAreaGetDepartmentByuserid(Long userid);
}
